Integrated circuits often use counters to monitor the number of occurrences of an event of interest. For example, in an integrated circuit used in a switch or router, it may be desired to keep track of certain events, such as the total number of packets processed, the number of packets processed of a particular type, the number of packets processed of a particular length, and any number of other performance metrics.
When an event of interest occurs, a counter associated with that particular event may be determined. The determined counter may then be incremented. The count may be retrieved directly from the integrated circuit. In some implementations, the value of the counter may be periodically sent to an external memory. An application wishing to determine the value of the counter may retrieve the value from the external memory, as opposed to retrieving the value directly from the integrated circuit.